﻿using Infrastructure.DDD;

namespace Application.Entities
{
    public class SysMenu : Entity
    {
        public string Title { get; set; }
        public MenuType Type { get; set; }
        public int Level { get; set; }
        /// <summary>
        /// 路由路径（浏览器显示地址）/功能api
        /// </summary>
        public string RoutePath { get; set; }
        /// <summary>
        /// router-link name 路由名称； 唯一性；若未设置则默认使用 RoutePath
        /// </summary>
        public string RouteName { get; set; }
        /// <summary>
        /// 需要注册的前端组件地址
        /// </summary>
        public string ComponentPath { get; set; }
        public int Sort { get; set; }
        public string Icon { get; set; }
        public string Note { get; set; }
        public int ParentId { get; set; }
        public bool IsEnable { get; set; }
        /// <summary>
        /// false:显示在菜单栏
        /// </summary>
        public bool Hidden { get; set; }
        public List<SysMenu> Children { get; set; }
    }
    /// <summary>
    /// 1菜单，2功能
    /// </summary>
    public enum MenuType
    {
        menu = 1,
        func = 2
    }
}
